const getUrl = () => {
  let hostname = window.location.hostname;
  let url = '';
  switch (hostname) {
    case 'localhost':
      // 测试环境
      //url = 'http://house.fxsk200.com'
      //url = 'https://red5.tongrong365.com'
      url = 'https://moerlong.bangzheng100.com'
      break;
    default:
      // 正式环境
      //url = 'http://house.fxsk200.com'
      //url = 'https://car.fxsk200.com'
      //url = 'https://moerlong.fanxingshuke.com'
      url = 'https://moerlong.bangzheng100.com'
      break;
  }
  return url;
}

export default {

  method: 'post',

  // 开发环境
  // baseURL:'http://119.23.236.11/',
  // baseURL:'http://htyh.daofen100.com/',
  //baseURL: 'http://gdt.daofen100.com',
  baseURL: getUrl(),
  //baseURL: 'api/',

  // 请求头信息
  headers: {
    'Content-Type': 'application/json;charset=UTF-8'
    /* 'X-Requested-With': 'XMLHttpRequest',
		'Access-Control-Allow-Origin':'*' */
  },

  // 参数
  data: {},

  // 设置超时时间
  timeout: 10000,

  // 携带凭证
  withCredentials: true,

  // 返回数据类型
  responseType: 'json'

}
